using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using DataAccessLayer;

public partial class AdminLogin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        Common c = new Common();
        string conn = c.fetchConnString();
        
        Admin admin = new Admin(conn);
        admin.ADMINID = txtAId.Text;
        admin.PASSWORD = txtAPassword.Text;
        admin.EMAIL = txtAEmail.Text;
        int check = admin.funcVerification();
        if (check == 1)
        {
            Session["type"] = "admin";
            Response.Redirect("AdminProfile.aspx");
        }
    }
    
    protected void imgbtnHome_Click(object sender, ImageClickEventArgs e)
    {
        Response.Redirect("Home.aspx");
    }

    protected void lnkAboutUs_Click(object sender, EventArgs e)
    {
        Response.Redirect("About Us.aspx");
    }

    protected void lnkContactUs_Click(object sender, EventArgs e)
    {
        Response.Redirect("Contact Us.aspx");
    }

    protected void lnkFeedback_Click(object sender, EventArgs e)
    {
        Response.Redirect("Feedback.aspx");
    }
}
